/**
 * Form组件
 * @class Form
 * @extends Complex
 * @author 杜慧玲
 *
 *  @param {function} reset  重置输入框中的value
 *
 * 示例：
 *
 *     @example
 *     var input = new UDM({})
 *     var FormItem = UcsmyUI.FormItem;
 *     <Form>
 *         <FormItem dmbind={input.dmbind}>
 *              <Input dmbind={input.dmbind} />
 *         </FormItem>
 *     </Form>
 */
var Form = React.createClass({
    /**
     * 重置输入框中的value
     * @param void
     * */
    reset:function(){
        for(var i = 0;i < this.props.children.length;i++){
            var item = this.props.children[i];
            var disname = item.displayName ? item.displayName.toLowerCase() : "";
            if(disname == "formitem"){
                item.clearValue();
            }
        }
    },
    render:function(){
        return(
            <div>
                {this.props.children}
            </div>
        )
    }
});
module.exports = Form;